<?php
    $rss = new rss();
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?".">"; ?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
        <?php
            $articles = $rss->getArticlesByCattegoryLink($config['link']);
        ?>
	<title><?php echo $articles['cat_name'];?> - bantinnhadat.vn - RSS</title>
	<atom:link href="<?php echo $config['domain'];?>/rss/<?php echo $articles['cat_link'];?>" rel="self" type="application/rss+xml" />
	<link><?php echo $config['domain'];?>/rss/<?php echo $articles['cat_link'];?></link>
	<description>bantinnhadat.vn - rss bantinnhadat</description>
        <pubDate><?php echo date("Y-m-d H:i:s", time()) ;?></pubDate>
	<lastBuildDate><?php echo date("Y-m-d H:i:s", time()) ;?></lastBuildDate>

	<language>vn</language>
        <?php
            while($rs=$db->fetch_array($articles['rsArticles'])) {
        ?>
   		  <item>
                        <title><![CDATA[ <?php echo $rs['title'];?> ]]></title>
                        <link><?php echo $config['domain'];?>/<?php echo $rs['link'];?>.html</link>
                        <pubDate><?php echo date("Y-m-d H:i:s", strtotime ($rs['create_date'])) ;?></pubDate>
                        <dc:creator>bantinnhadat.vn</dc:creator>
                        <guid isPermaLink="false"><?php echo $config['domain'];?>/<?php echo $rs['link'];?>.html</guid>
                        <description><![CDATA[ <a href = "<?php echo $config['domain'];?>/<?php echo $rs['link'];?>.html" title="<?php echo viewTitleLink($rs['title']);?>" > <img border="0" src="<?php echo $config['domain'];?><?php echo createThumb($rs['image'],'137-113');?>" /> </a><?php echo $rs['short_description'];?>]]></description>
                        
    		</item>
        <?php
            }
        ?>
	</channel>
</rss>